package tesys.objects;
/**
 * @author Group5 Comp3350
 *
 */
public class Project {
	
	private String name;
	private String intro;
	private String mID;//managerid
	private String id;
 
	//constructor
	public Project(String name, String mID, String ID)
	{
		this.name=name;
		this.mID=mID;
		this.id=ID;
	}	
	public Project(String ID)
	{
		this.id=ID;
	}	
	//Mutator 
	//create an introduction
	public void createIntro(String intro)
	{
		this.intro = intro;
	}
	//accessor
	public String getName(){return name;}
	public String getIntro(){return intro;}
	public String getManagerID(){return mID;}
	public String getID(){return id;}

	//compareTo()
	//to check if 2 objects are same
	public boolean compareTo(Object obj)
	{
		boolean result;
		Project t;
		
		result = false;
		
		if (obj instanceof Project)
		{
			t = (Project) obj;
			if (t.getID().equalsIgnoreCase(id))
			{
				result = true;
			}
		}
		return result;
	}

	//toString()
	public String toString () 
	{
		return "Project: "+id+" "+name+" "+intro+" "+mID;
	}

}

